package edu.cuit.zhuyimeng.aircraft.dal.po;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serial;
import java.io.Serializable;

import edu.cuit.zhuyimeng.aircraft.enums.AircraftStatus;
import lombok.Data;

/**
 * 飞机表
 * @TableName aircraft
 */
@TableName(value ="aircraft")
@Data
public class AircraftPO implements Serializable {
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 飞机型号
     */
    @TableField(value = "model")
    private String model;

    /**
     * 载客量
     */
    @TableField(value = "capacity")
    private Integer capacity;

    /**
     * 是否被锁定
     */
    @TableField(value = "locked")
    private Integer locked = 0;

    /**
     * 飞机状态
     */
    @TableField(value = "status")
    private Integer status = AircraftStatus.IDLE.getType();

    /**
     * 逻辑删除
     */
    @TableField(value = "deleted")
    @TableLogic
    private Integer deleted;

    /**
     * 航空公司ID
     */
    @TableField(value = "airline_id")
    private Integer airlineId;

    @TableField(exist = false)
    @Serial
    private static final long serialVersionUID = 1L;
}